package com.dews.train.domain.dto;

import com.dews.common.utils.valid.AddGroup;
import com.dews.common.utils.valid.UpdateGroup;
import io.swagger.annotations.ApiModelProperty;
import jakarta.validation.constraints.NotBlank;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.ToString;

import javax.validation.constraints.Min;
import javax.validation.constraints.NotNull;


/**
 * 专业培养方案对象 dews_training_program
 *
 * @author qingfeng
 * @date 2024-11-30
 */
@Data
@Builder
@AllArgsConstructor
@NoArgsConstructor
@ToString
public class TrainingProgramDTO {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty("主键ID")
    @NotNull(message = "主键ID不能为空", groups = {UpdateGroup.class})
    private Integer id;

    @ApiModelProperty("学院")
    @NotNull(message = "学院不能为空", groups = {AddGroup.class, UpdateGroup.class})
    private Long depId;

    @ApiModelProperty("专业")
    @NotNull(message = "专业不能为空", groups = {AddGroup.class, UpdateGroup.class})
    private Integer subjectId;

    @ApiModelProperty("培养方案标题")
    @NotBlank(message = "培养方案标题不能为空", groups = {AddGroup.class, UpdateGroup.class})
    private String trainingProgramTitle;

    @ApiModelProperty("年级")
    @NotBlank(message = "年级不能为空", groups = {AddGroup.class, UpdateGroup.class})
    private String grade;

    @ApiModelProperty("培养方案内容")
    @NotBlank(message = "培养方案内容不能为空", groups = {AddGroup.class, UpdateGroup.class})
    private String content;

    @ApiModelProperty("毕业总学分")
    @NotNull(message = "毕业总学分不能为空", groups = {AddGroup.class, UpdateGroup.class})
    @Min(value = 0, message = "毕业总学分不能小于0", groups = {AddGroup.class, UpdateGroup.class})
    private Integer totalCreditsGraduation;

    @ApiModelProperty("毕业总学绩分：学分乘以绩点")
    @NotNull(message = "毕业总学绩分不能为空", groups = {AddGroup.class, UpdateGroup.class})
    @Min(value = 0, message = "毕业总学绩分不能小于0", groups = {AddGroup.class, UpdateGroup.class})
    private Integer totalAcademicPerformanceScore;

    @ApiModelProperty("课外学分")
    @NotNull(message = "课外学分不能为空", groups = {AddGroup.class, UpdateGroup.class})
    @Min(value = 0, message = "课外学分不能小于0", groups = {AddGroup.class, UpdateGroup.class})
    private Integer extracurricularCredits;

    @ApiModelProperty("是否无处分：0：不做要求，1：毕业时无任何处分（或处分已解除）")
    @NotNull(message = "是否无处分不能为空", groups = {AddGroup.class, UpdateGroup.class})
    @Min(value = 0, message = "是否无处分不能小于0", groups = {AddGroup.class, UpdateGroup.class})
    private Integer isDisciplinaryAction;

    @ApiModelProperty("是否启用：0-未启用  1-启用")
    @NotNull(message = "是否启用不能为空", groups = {AddGroup.class, UpdateGroup.class})
    @Min(value = 0, message = "是否启用不能小于0", groups = {AddGroup.class, UpdateGroup.class})
    private Integer isEnable;
}
